A bar code is a specialized code used for fast identification of items with a bar code scanner. The bar code consists of a sequence of alternating bars and spaces, each of which is either wide or narrow. The bar and space widths represent one or more machine-interpretable values.
Bar codes are commonly encoded in a 3-of-9 encoding scheme. According to the 3-of-9 scheme, every bar code begins with a 9-bit sequence (the "start sequence") that represents a start character and ends with the same 9-bit sequence (the "end sequence") that represents an end character. Between the start and end sequences are 9-bit data sequences that represent ASCII characters.
The start and end characters of the bar code indicate the bar code's class, and the class indicates the order in which the ASCII characters are represented. Characters in a bar code of a first class are arranged from right to left. Characters in a second class are arranged left half before right half. For example, a second class bar code 012345 would be unscrambled to 345012. Characters in the third class are arranged from left to right. The 3-of-9 encoding is fully described in ANSI specification MH10.8M - 1983, which is incorporated herein by reference as if set forth in full below.
One use of bar codes is in a mass storage system for a computer system. A representative mass storage system is described in the U.S. Pat. No. 4,932,826. In that system, data cartridges are stored in hexagonal compartments in a honeycomb-like apparatus that includes mechanisms for fetching cartridges from the compartments, for reading and writing data on them, and for replacement of the cartridges in the compartments. Each data cartridge is labeled with a bar code for identification purposes.
There are several conventional approaches for converting scan data into machine-interpretable codes such as ASCII, but each has deficiencies when used in the mass storage system. In one conversion approach, all or nearly all of the scan data are analyzed. For example, point of sale (POS) terminals commonly employ this approach in interpreting universal product codes. While the time required to perform such an analysis would not likely slow an operator of the POS terminal, it would substantially degrade the performance of the mass storage system.
A second conversion approach analyzes a single horizontal line of the scan data array. Doing so requires very little computation time but only produces accurate results if the line analyzed intersects every bar and space of the bar code. As with the UPC label, the cartridge bar code label may be tilted or partially obscured, making it difficult or impossible to identity such a line. And such a line is especially rare in cartridge bar code scan dam, as cartridge bar codes generally have large numbers of bars and spaces (so as to unambiguously identify a large number of cartridges), and the bars and spaces are relatively short (so as to fit on the cartridges).
Therefore, what is needed is a bar code scan conversion technique that generates machine-interpretable code quickly and accurately even if the scan data array has no line which intersects every bar and space.